// HEADER
.layout-header {
  position: absolute;
  width: 100%;
  height: auto;
  z-index: 1000;
  top: 0;
  left: 0;
  &.active{
    height: 100%;
    overflow: auto;
    .layout-header-bottom{
      height: 100%;
      .inner{
        height: 100%;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
      }
    }
  }
  @media (min-width: $br-mobile){
    position: relative;
    overflow: visible;
    height: auto;
    &.active{
      height: auto;
      overflow: visible;
      .layout-header-bottom{
        height: auto;
        .inner{
          height: auto;
          overflow: visible;
          -webkit-overflow-scrolling: touch;
        }
      }
    }
  }
}








// top HEADER
.layout-header-top {
  background: #F7F7F7;
  position: fixed;
  width: 100%;
  bottom: 0;
  left: 0;
  z-index: 11;
  border-top: 1px solid $border;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  @media (min-width: $br-mobile){
    position: relative;
    padding: 4px 10px;
    border-top: none;
    border-bottom: 1px solid $border;
  }
  @include clearfix();
  nav {
    >div{
      width: 100%;
      overflow-y: hidden;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      @media (min-width: $br-mobile){
        width: auto;
        overflow: visible;
      }
      >ul {
        min-width: 470px;
        width: 100%;
        height: 55px;
        padding: 0;

        @media (min-width: $br-mobile){
          width: auto;
          min-width: 0;
          margin: 0;
          padding: 0 5px;
          height: auto;
        }
        >li {
          float: left;
          height: 55px;
          border-left: 1px solid transparent;
          border-right: 1px solid transparent;
          &.active {
            background: $white;
            border-color: $border;
          }
          @media (min-width: $br-mobile){
            height: 25px;
            width: 25px;
            margin: 0 0 0 20px;
            border: none;
            &:first-child {
              margin: 0;
            }
            &:hover {
              .home-submenu, .apps-submenu{
                opacity: 1;
                visibility: visible;
              }
            }
          }
          >a,.link {
            position: relative;
            cursor: pointer;
            display: inline-block;
            line-height: 55px;
            min-width: 50px;
            padding: 10px;
            text-transform: uppercase;
            @include transition(all 0.15s $easeInOutCubic);
            @media (min-width: 550px){
              min-width: 70px;
            }
            @media (min-width: $br-mobile){
              padding: 0;
              min-width: 0;
              width: 100%;
              height: 100%;
              line-height: normal;
            }

            >span {
              font-size: 12px;
              color: #000;
              line-height: 28px;
              margin: 0 0 0 5px;
              // display: none;
              @media (min-width: $br-mobile){
                display: block;
                em{
                  display: inline-block;
                }
              }

            }
            .tooltip1{
              margin: 0;
              line-height: normal;
              display: block;
              position: relative;
              background: none;
              box-shadow: none;
              z-index: 1;
              visibility: visible;
              opacity: 1;
              color: $dark;
              top: auto;
              left: auto;
              text-align: center;
              padding: 2px 0 0;
              font-size: 10px;
              @include transform(translate(0,20px));
              &:after {
                display: none;
              }
              @media (min-width: $br-mobile){
                display: none;
              }
            }

            form{
              >input {
                border: none;
                border-bottom: 2px solid #B6B6BA;
                background: none;
                box-shadow: none;
                font-size: 11px;
                height: 25px;
                outline: none;
                width: auto;
                // font-family: inherit;
                margin: 0;
                padding: 5px 5px 0px;
                position: relative;
                top: -2px;
              }
            }
            svg {
              fill: #B6B6BA;
              position: absolute;
              top: 6px;
              left: 50%;
              @include transform(translate(-50%,0));
              @media (min-width: $br-mobile){
                position: relative;
                top: auto;
                left: auto;
                @include transform(translate(0,0));
                width: 20px;
                height: 25px;
                display: block;
                margin: 0 auto;
              }
            }
            &.current  {
              &:after {
                content: "";
                position: absolute;
                top: -5px;
                left: 0;
                height: 3px;
                width: 100%;
                background: $cGreen;
              }
              svg {
                fill: $cGreen;
              }
            }
          }
        }
      }
    }
    // Btn-menu
    .btn-menu{
      // @extend .reset-btn;
      width: 55px;
      height: 100%;
      position: absolute;
      top: 50%;
      right: 0;
      display: block;
      z-index: 5;
      box-shadow: none;
      background-color: darken($light,10%);
      border: none;
      outline: none;
      @include transform(translate(0,-50%));
      font-family: inherit;
      span{
        display: block;
        font-size: 10px;
        text-transform: uppercase;
        position: relative;
        top: 0px;
      }
      &:after{
        content: "";
        display: block;
        width: 20px;
        height: 100%;
        right: 100%;
        position: absolute;
        top: 0;
        z-index: 2;
        @include gradient(left,rgba(247,247,247,0),rgba(247,247,247,1));
      }
      @media (min-width: $br-mobile){
        display: none;
      }
      .icon{
        margin: 0 auto;
        fill: $dark;
        &.hamburguer{
          display: block;
        }
        &.close {
          display: none;
        }
      }
      &.active{
        background: $white;
        border-left: 1px solid $border;
        box-shadow: 1px -2px 0 $white;
        .icon{
          margin: 0 auto;
          &.hamburguer{
            display: none;
          }
          &.close {
            display: block;
          }
        }
        &:after{
          border-right: 1px solid $border;
        }
      }
    }

    &.first-nav {
      float: left;
      position: relative;
      width: 100%;
      @media (min-width: $br-mobile){
        padding: 0;
        width: auto;
        position: static;
      }
      @media (min-width: $br-mobile){
        >div{
          >ul {
            >li {
              >a,.link {
                &:hover  {
                  &.shape-apps{
                    .tooltip1{
                      visibility: hidden;
                      opacity: 0;
                    }
                  }
                  .tooltip1{
                    visibility: visible;
                    opacity: 1;
                  }
                }
              }
            }
          }
        }
      }

    }
    &.second-nav {
      float: right;
      >div{
        >ul  {
          >li  {
            height: 25px;
            width: auto;
            position: relative;
            >a,
            .link {
              text-indent: 0;
              width: auto;
              >span {
                display: none;
                @media (min-width: $br-tablet){
                  display: inline-block;
                }
              }
              svg {
                height: 25px;
                float: left;
                display: inline-block;
              }
            }
            .home_data {
              font-size: 12px;
              border: 0;
              span {
                line-height: 28px;
              }
              &:visited {
                color: #000;
              }
            }
            &:hover {
              .submenu-tooltip {
                visibility: visible;
                opacity: 1;
              }
            }
          }
        }
      }
    }
  }
}
















// Bottom HEADER
.layout-header-bottom {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  @include clearfix();
  @media (min-width: $br-mobile){
    position: relative;
    background: rgba(#FFF,0.8);
    border-bottom: 1px solid $border;
  }

  .is-map-page &{
    h1{
      margin: 0 0 0 10px;
      @media (min-width: $br-mobile){
        width: 60px;
        height: 60px;
      }
      @media (min-width: $br-mobileMap){
        width: 90px;
        height: 90px;
      }

    }
  }

	// Logo
	h1 {
    width: 60px;
    height: 60px;
    position: absolute;
    top: 0;
    left: 0;
		text-indent: -9999px;
    z-index: 11;
    margin: 0 0 0 15px;
    @include retina-image('logo-new.png','logo-new@2x.png');
    @include transition(all 0.25s linear);
    &.active{
      opacity: 0;
      visibility: hidden;
    }
    &:after{
      content: "";
      display: block;
      width: 30px;
      height: 18px;
      position: absolute;
      bottom: -5px;
      right: -5px;
      background: image-url('beta.png');
    }
    .beta-box{
      display: none;
    }
    @media (min-width: $br-mobile){
      width: 90px;
      height: 90px;
      margin: 0;
      &.active{
        opacity: 1;
        visibility: visible;
      }
    }
		a {
			display: block;
			height: 100%;
			width: 100%;
		}
	}


  // Search Widget mobile
  form{
    padding: 20px 20px 30px 90px;
    // border-top: 1px solid #CCC;
    >input {
      border: none;
      border-bottom: 2px solid #B6B6BA;
      background: none;
      box-shadow: none;
      width: calc(100% - 25px);
      height: 25px;
      outline: none;
      margin: 0;
      padding: 0 5px;
    }
    svg {
      float: left;
      fill: #B6B6BA;
    }
  }


	// Nav-right
	nav {
		border-bottom: 1px solid #EAECEF;
    clear: both;
    padding: 0 0 60px;
    background: $white;
    display: none;
    position: relative;
    min-height: 100%;
    &.active{
      display: block;
    }
    @media (min-width: $br-mobile){
      padding: 0;
      display: block !important;
      min-height: 0;
      clear: none;
      background: none;
      border-bottom: none;
      &.layers-menu{
        display: none !important;
        @media (min-width: $br-mobileMap){
          padding: 0;
          display: block !important;
          min-height: 0;
          clear: none;
          background: none;
          border-bottom: none;
          &.layers-menu{

          }
        }
      }
    }

		@include clearfix();
		>ul {
      clear: none;
      float: right;
      padding-right: 5px;
			>li {
        position: relative;
        border-top: 1px solid darken($border,10%);
        float: left;
        border-top: none;
        top: 1px;
        &:hover {
          z-index: 5;
          >a{
            &:after{
              opacity: 1;
            }
          }
          ul {
            background: rgba(#fff,0.95);
            visibility: visible;
            opacity: 1;
            li{
              a{
                @include transform(translate(0%,0px));
                visibility: visible;
                opacity: 1;
             }
            }
          }
        }
        margin: 0 0 0 10px;
        &:first-child { margin: 0;}

				>a {
					display: block;
					text-transform: uppercase;
					color: $dark;
					position: relative;
					z-index: 2;
          text-align: center;
          padding: 20px 25px;

          @media (min-width: 1050px){
            padding: 20px 40px;
          }

          &:after{
            content: "";
            background-color: $cGreen;
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 5px;
            opacity: 0;
            @include transition(all 0.2s $easeInOutCubic);
          }

          &.current, &:hover{
            &:after{
              opacity: 1;
            }
          }
				}
				//submenu
				ul {
					width: 100%;
          z-index: 1;
          position: absolute;
          top: 0;
          left: 50%;
          min-width: 150px;
          padding: 56px 0 0;
          box-shadow: 0 1px 3px rgba(#000,0.25);
          visibility: hidden;
          opacity: 0;
          @include transform(translate(-50%,0px));
          @include transition(all 0.15s $easeInOutCubic);
          &:after{
            content: "";
            display: block;
            position: absolute;
            top: 51px;
            left: 0;
            width: 100%;
            height: 5px;
            background: $cGreen;
          }
					li {
            border-top: 1px solid rgba(0,0,0,0.07);
            @for $i from 1 through 10 {
              &:nth-child(#{$i}) a{
                // @include transition(all 0.2s $easeInOutSine $i*0.04s);
              }
            }

						a {
							color: $dark;
							padding: 10px;
							font-size: 15px;
							text-align: center;
							display: block;
              // opacity: 0;
              // visibility: hidden;
              // @include transform(translate(-5%,0px));
              position: relative;
							&:hover {
								background: darken(#FFF,2%);
							}
						}
					}
        }
      }
    }
  }
}

.layout-header .mobile-menu{
  h3{
    border-top: 1px solid #cecec3;
    font-size: 16px;
    padding: 0;
    text-transform: uppercase;
    color: $dark;
    a{
      display: block;
      text-transform: uppercase;
      color: $dark;
      padding: 20px;
      position: relative;
      z-index: 2;
      text-align: center;
      background: #F2F2F3;
      &:after{
        content: "";
        background-color: $cGreen;
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 5px;
        opacity: 0;
        @include transition(all 0.2s $easeInOutCubic);
      }

      &.current, &:hover{
        &:after{
          opacity: 1;
        }
      }
    }
  }
  ul {
    width: 100%;
    z-index: 1;
    position: relative;
    li {
      a {
        color: $dark;
        padding: 10px;
        font-size: 15px;
        text-align: center;
        display: block;
        &:hover {
          background: darken(#FFF,2%);
        }
      }
    }
  }
}



// Google Translate
#google_translate_element_box2{
  padding: 15px 15px 10px;
  display: none;
  @media (min-width: $br-mobile){
    display: none;
  }
}

#google_translate_element {
  .goog-te-gadget {
    font-family: inherit;
    text-align: center;
    .goog-te-gadget-simple {
      border: none;
      background: none;
      .goog-te-menu-value  {
        color: #000;
        text-transform: uppercase;
        font-size: 12px;
        line-height: 28px;
        position: relative;
        padding-right: 16px;
        span {
          &:last-child {
            visibility: hidden;
            display: block;
            position: absolute;
            top: 50%;
            right: 0;
            height: 16px;
            width: 16px;
            @include transform(translate(0,-55%));
            &:before {
              content: "";
              visibility: visible;
              display: block;
              height: 100%;
              width: 100%;
              background: image-url('svg-icons/arrow-down.svg') no-repeat center;
              background-size: contain;
            }
          }
        }
      }
    }
  }
}


.layout-share-mobile{
  display: block;
  // .is-map-page &{
  //   display: none;
  // }
  .share-link{
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    background: $white;
    .is-map-page &{
      top: 15px;
    }
    svg{
      fill: $dark;
      position: absolute;
      top: 50%;
      left: 50%;
      width: 18px;
      height: 18px;
      @include transform(translate(-50%,-50%));
    }
  }
  .menu-section-link{
    position: absolute;
    top: 0;
    right: 44px;
    border-right: 1px solid $border;
    padding: 0 40px 0 15px;
    line-height: 46px;
    font-size: 14px;
    height: 44px;
    text-transform: uppercase;
    color: $dark;
    &.active{
      background: $light;
    }
    svg{
      fill: $dark;
      position: absolute;
      top: 50%;
      right: 0%;
      width: 22px;
      height: 22px;
      @include transform(translate(-50%,-50%));
    }
  }
  .menu-section-dropdown{
    display: none;
    position: absolute;
    top: 44px;
    left: 0;
    padding: 30px 20px;
    background: $light;
    width: 100%;
    li{
      margin: 10px 0 0;
      &:first-child{
        margin: 0;
      }
      a{
        width: 100%;
      }
    }
    &.active{
      display: block;
    }
  }
  @media (min-width: $br-mobile){
    display: none;
  }
}
